<template>
  <div class="userinfo">
<navbar></navbar>
  <img src="@/assets/topbanner.png" class="back">
    <user-detail :userInfo="model"></user-detail>
    </div>
</template>

<script>
import Navbar from "../components/common/Navbar";
import UserDetail from "../components/userComponent/userDetail";
export default {
  name: "userinfo",
  components:{
    UserDetail,
    Navbar
  },
  data(){
    return {
      model:{}
    }
  },
  methods:{
   async UserinfoData(){
      const res = await this.$http.get('/user/'+localStorage.getItem('id'))
     this.model=res.data[0]
    },
  },
  created() {
    this.UserinfoData()
  }
}
</script>

<style scoped lang="less">
.userinfo{
  .back{
    height: 27.78vw;
    width: 100%;
  }
}
</style>
